package cn.virens.common.mybatis.entity.param;


import cn.virens.common.util.exception.APIException;

/**
 * 带有当前登录用户信息
 *
 * @author virens
 */
@SuppressWarnings("serial")
public class PageParamUser extends PageParam {
    public static final String K_GLOBAL = "_global";
    public static final String K_TENANT = "tenant";
    public static final String K_DEPART = "depart";
    public static final String K_AREA = "area";
    public static final String K_ROLE = "role";
    public static final String K_UUID = "uuid";

    /**
     * 添加请求参数中的租户标识
     */
    public void addTenant(String tenant) throws APIException {
        this.addParam(K_TENANT, tenant);
    }

    /**
     * 添加请求参数中的部门标识
     */
    public void addDepart(String depart) throws APIException {
        this.addParam(K_DEPART, depart);
    }

    /**
     * 添加请求参数中的辖区标识
     */
    public void addArea(String area) throws APIException {
        this.addParam(K_AREA, area);
    }

    /**
     * 添加请求参数中的角色标识
     */
    public void addRole(String role) throws APIException {
        this.addParam(K_ROLE, role);
    }

    /**
     * 添加请求参数中的用户标识
     */
    public void addUuid(String uuid) throws APIException {
        this.addParam(K_UUID, uuid);
    }

}
